<!DOCTYPE html>
<html lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta name="keywords" content="">
<meta name="description" content="">
<title>相似图片入库</title>
<link rel="shortcut icon" type="image/x-icon" href="/favicon1.ico">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/materialdesignicons.min.css">
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/bootstrap.min.css">
<!--tags插件css-->
<link type="text/css" rel="stylesheet" href="__STATIC__/admin/js/jquery-tagsinput/jquery.tagsinput.min.css">
<!--上传插件css-->
<link type="text/css" rel="stylesheet" href="__STATIC__/admin/js/webuploader/webuploader.css">
<!--灯箱效果插件css-->
<link type="text/css" rel="stylesheet" href="__STATIC__/admin/js/magnific-popup/magnific-popup.min.css">
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/animate.min.css">
<!--引入下拉插件css-->
<!-- <link rel="stylesheet" type="text/css" href="__STATIC__/admin/js/bootstrap-select/bootstrap-select.min.css"> -->
<link href="__STATIC__/common/select2/select2.css" rel="stylesheet">
<!--日期选择器css-->
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/js/bootstrap-datepicker/bootstrap-datepicker3.min.css">
<!--时间日期选择器css-->
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css">
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/style.min.css">

<link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/style.min.css">
<link rel="stylesheet" type="text/css" href="__STATIC__/common/cch.css">

</head>
  
<body>
<div class="container-fluid">
  
  <div class="row">
    
    <div class="col-lg-12">
      <div class="card">
        <!-- <header class="card-header"><div class="card-title">新增文档</div></header> -->
        <div class="card-body">
          
          <form action="" method="post" class="row">
            {include file="html/fields" /}

            <div class="mb-3 col-md-12">
              <div class="card-btns mb-2-5">
                <a class="btn btn-success me-1" href="javascript:void(0)" onclick="cloneParams()"><i class="mdi mdi-plus"></i> 新增</a>
              </div>
              <div class="table-responsive">
                <table class="table table-bordered" id="tablednd">
                  <thead>
                    <tr>
                      <th>参数名称</th>
                      <th>参数值</th>
                      <th>操作</th>
                    </tr>
                  </thead>
                  <tbody>
                      <?php foreach ($data['brief'] as $k => $vo): ?>
                        <tr>
                          <td><input type="text" class="form-control" name="brief[name][]" value="{:$vo['name']}" /></td>
                          <td><input type="text" class="form-control" name="brief[value][]" value="{:$vo['value']}" /></td>
                          <td>
                            <div class="btn-group btn-group-sm">
                              <a class="btn btn-default" href="javascript:void(0)" onclick="deleteParams(this)" data-bs-toggle="tooltip" title="删除"><i class="mdi mdi-delete"></i></a>
                            </div>
                          </td>
                        </tr>
                      <?php endforeach ?>
                  </tbody>
                </table>
              </div>
            </div>





            <div class="mb-3 col-md-12">
              <button type="submit" class="btn btn-primary ajax-post" target-form="add-form">确 定</button>
              <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);return false;">返 回</button>
            </div>
          </form>
          
        </div>
      </div>
    </div>
        
  </div>
  
</div>



<table class="my_clone" style="display: none;">
  <tr>
    <td><input type="text" class="form-control" name="brief[name][]" value="" /></td>
    <td><input type="text" class="form-control" name="brief[value][]" value="" /></td>
    <td>
      <div class="btn-group btn-group-sm">
        <a class="btn btn-default" href="javascript:void(0)" onclick="deleteParams(this)" data-bs-toggle="tooltip" title="删除"><i class="mdi mdi-delete"></i></a>
      </div>
    </td>
  </tr>
</table>



<script type="text/javascript" src="__STATIC__/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/popper.min.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/bootstrap.min.js"></script>
<!--tags插件-->
<script type="text/javascript" src="__STATIC__/admin/js/jquery-tagsinput/jquery.tagsinput.min.js"></script>
<!--上传插件-->
<script type="text/javascript" src="__STATIC__/admin/js/webuploader/webuploader.js"></script>
<!--灯箱效果插件-->
<script type="text/javascript" src="__STATIC__/admin/js/magnific-popup/magnific-popup.min.js"></script>
<!--通知消息插件-->
<script type="text/javascript" src="__STATIC__/admin/js/bootstrap-notify.min.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/main.min.js"></script>
<!--引入下拉插件js-->
<!-- <script type="text/javascript" src="__STATIC__/admin/js/bootstrap-select/bootstrap-select.min.js"></script> -->
<script src="__STATIC__/common/select2/select2.min.js"></script>
<!--省市选择-->
<script type="text/javascript" src="__STATIC__/common/distpicker/distpicker.data.js"></script>
<script type="text/javascript" src="__STATIC__/common/distpicker/distpicker.js"></script>
<!-- 百度编辑器 -->
<script type="text/javascript" src="__STATIC__/common/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/common/ueditor/ueditor.all.js"></script>
<!--日期选择器js-->
<script type="text/javascript" src="__STATIC__/admin/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<!--时间日期选择器js-->
<script type="text/javascript" src="__STATIC__/admin/js/momentjs/moment.min.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/momentjs/locale/zh-cn.min.js"></script>
<!--自定义扩展-->
<script type="text/javascript" src="__STATIC__/common/cch.js"></script>
{include file="html/jspath" /}
<script type="text/javascript">  
    function cloneParams(){
        var my_clone = $('.my_clone').find('tr')[0];
        var temp = $(my_clone).clone(true);
        var result = $("#tablednd").append(temp);
    }

    function deleteParams(obj){
        $(obj).parent().parent().parent().remove();
    }


  </script> 

</body>
</html>